 /* 
 * File:   cAgentNest.cpp
 * Author: josep
 * 
 * Created on 27 / desembre / 2010, 13:53
 */

#include "cAgentNest.h"

cAgentNest::cAgentNest() {
}

cAgentNest::cAgentNest(const cAgentNest& orig) {
    children=orig.children;
}

cAgentNest::~cAgentNest() {
    while(!children.empty()){
        cAutonomousAgent* ag = children.front();
        children.pop();
        delete ag;
    }
}

bool cAgentNest::hasChild(){
    return !children.empty();
}
cAutonomousAgent* cAgentNest::popChild(){
    cAutonomousAgent* ret = children.front();
    children.pop();
    return ret;
}
